﻿package {	import flash.display.MovieClip;	import flash.net.XMLSocket;	import org.fwiidom.osc.OSCConnection; 	import org.fwiidom.osc.OSCPacket; 	import flash.events.MouseEvent;	public class Osc extends MovieClip	{		private var n_osc:OSCConnection; 		private var n_port:Number = 3000;		private var r_port:Number = 12000;		private var n_host:String = 'localhost';						public function Osc()		{			n_osc = new OSCConnection(n_host, n_port);			n_osc.connect();						stage.addEventListener(MouseEvent.CLICK, mClick);			/*osc = new OSCConnection(null, 3334);			var msg:OSCMessage = new OSCMessage("/test");			msg.addArg(10);			msg.addArg("nummer");			osc.sendOSCPacket(*/		}	public function mClick(e:MouseEvent):void{		trace("clicked");	var animal:OSCPacket = new OSCPacket("/animal",[1, 0, 0, 0, 2, 71, 0, 0], n_host, r_port);	n_osc.sendOSCPacket(animal);	var msg:OSCPacket = new OSCPacket("/gruss",["hallo welt"],n_host, r_port);	n_osc.sendOSCPacket(msg);	}	}}